package com.yxt.qmgf.shop.sql;

import com.yxt.qmgf.shop.vo.entity;
import com.yxt.qmgf.userinfo.vo.UserInfoVO;
import org.apache.ibatis.annotations.Param;

public class ShopSQLProvider {

    public String Select(){
        return "SELECT * FROM shop ";
    }

    public String Update(@Param("entity") entity entity) {
        return "UPDATE shop SET " +
                "name = #{entity.name}, " +
                "gongneng = #{entity.gongneng}, " +
                "price = #{entity.price}, " +
                "have = #{entity.have} " +
                "WHERE id = #{entity.id}";
    }

    public String Insert(@Param("entity") entity entity) {
        return "INSERT INTO shop (name, gongneng, price, have) " +
                "VALUES (#{entity.name}, #{entity.gongneng}, #{entity.price}, #{entity.have})";
    }

    // 删除方法
    public String Delete(@Param("id") Integer id) {
        return "DELETE FROM shop WHERE id = #{id}";
    }

    public String updateUidForAll(@Param("Uid") String Uid) { return "UPDATE SHOP SET Uid = #{Uid}";}

}
